#include <dbg.h>
#include <gtest/gtest.h>
using namespace std;

class Solution {
public:
    int findLengthOfLCIS(vector<int>& nums) {
        int res = 1;
        int cnt = 1;
        for (int i = 1; i < nums.size(); ++i) {
            if (nums[i] > nums[i - 1]) {
                ++cnt;
                res = max(res, cnt);
            } else {
                cnt = 1;
            }
            res = max(res, cnt);
        }
        return res;
    }
};

TEST(TEST1, findLengthOfLCIS) {
    Solution s;

    vector<int> nums = {1, 3, 5, 4, 7};
    EXPECT_EQ(s.findLengthOfLCIS(nums), 3);
}

TEST(TEST2, findLengthOfLCIS) {
    Solution s;

    vector<int> nums = {2, 2, 2, 2, 2};
    EXPECT_EQ(s.findLengthOfLCIS(nums), 1);
}

int main(int argc, char** argv) {
    ::testing::InitGoogleTest(&argc, argv);
    return RUN_ALL_TESTS();
}